<?php

//载入根目录config设定
include_once($_SERVER['DOCUMENT_ROOT']."/config.php");


//根据筛选框传递过来的内容，组装查找语句
include_once("../../controller/script/set_condition.php");


//根据页面信息，组装查找语句
include_once("../../controller/script/set_page.php");



//检验一下，如果当前页面 > 最大页，则不执行程序
if ($date['page_over_run'])
{
    exit();
}
else
{
    $_asset_list=select_lines_all_items($table_prefix."asset_data",$sort,
        $_condition,"$_data_start,$_quantity_per_page");
}









?>

<?
if($_REQUEST['sort'] == 'list'){?>
    <div class="StyledRow-sc-xqkn0o-0 fSGkgo row listviewrow clearfix">
    <?
}
?>
<?
foreach ($_asset_list as $key=>$asset)
{
    if($_REQUEST['sort'] == 'grid')
    {
?>

        <div class="media-holder transition" width="224" onclick="open_box(<?echo $asset['nid']?>)">
            <a class="thumbnail" >
                <div class="ImageContainer-sc-19bttq8-2 gNEuKI image-holder iskip pptx"
                     height="140">
                    <?if($asset['icon']){?>
                        <img src="/uploadfiles/<?echo $asset['icon']?>">
                        <?;}else{?>
                        <img src="/uploadfiles/<?echo $asset['asset_id']?>.jpg">
                        <?;}?>
                    <span class="IconExtension-sc-13p706v-0 loKyBz extension pptx">
                                <?echo $asset['file_type']?>
                            </span>
                </div>
                <div class="select">
                </div>
                <p>
                    <?echo $asset['title']?>
                </p>
                <dl >
                    <dt data-name="Brand" class="StyledDt-sc-1ijb1g4-0 bguRNK">
                        Brand
                    </dt>
                    <dd class="StyledDd-sc-1ijb1g4-1 gtsNXy">
                        <?echo $asset['brand']?>
                    </dd>
                    <br>
                    <dt  class="StyledDt-sc-1ijb1g4-0 bguRNK">
                        Product Range
                    </dt>
                    <dd
                            class="StyledDd-sc-1ijb1g4-1 gtsNXy">
                        <?
                        $_category=explode(",", $asset['product_category']);
                        foreach ( $_category as $v)
                        {echo  $category_name_list[$v];}
                        ?>
                    </dd>
                    <br>
                </dl>
            </a>
        </div>
        <?;}
    else{
        ?>

        <div class="media-holder listview list-media-view ui-selectee landscape" onclick="open_box(<?echo $asset['nid']?>)">
            <a class="ThumbnailContainer-sc-9k3xa3-0 dNIYfd thumbnail" >
                <div class="image-holder pdf">
                    <img src="/uploadfiles/<?echo $asset['asset_id']?>.jpg">
                </div>
                <div class="select"></div>
                <p> <?echo $asset['title']?></p>
                <span class="IconExtension-sc-13p706v-0 loKyBz extension pdf" >  <?echo $asset['file_type']?></span>
            </a>
            <ul class="listview-info">
                <li>
                    <strong class="StyledAssetName-sc-v0jk6q-0 eRhYJL">700 Series From Studio to Home - Toolkit</strong>
                </li>
                <dl></dl>
            </ul>
        </div>


        <?
    }
}
?>
<?
if($_REQUEST['sort'] == 'list'){?>
    </div>>
    <?
}
?>